import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)
import _ from '@/util/simba.js'
var router = new VueRouter({
    routes: [
        {
            path: '/search',
            component: () => import(/* webpackChunkName: "group-search" */ '../home/search.vue')
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "group-home" */ '../home/home.vue')
        },
        {
            path: '/list',
            component: () => import(/* webpackChunkName: "group-list" */ '../home/list.vue')
        },
        {
            path: '/detail',
            component: () => import(/* webpackChunkName: "group-detail" */ '../components/detail')
        }
    ]
})
router.beforeEach((to, from, next) => {
    _.loadingstar()
    setTimeout(function () {
        next()
    }, 500)
})
router.afterEach((to, from, next) => {
    _.loadingstop()
});
export default router

